package com.yundao;

import com.yundao.bean.User;
import com.yundao.service.IUserService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Created by linving on 2017/3/7.
 */
public class Application {
    private static Logger logger = LoggerFactory.getLogger(Application.class);

    public static void main(String args[]) {
        ApplicationContext ctx = new ClassPathXmlApplicationContext("spring-context.xml");
        IUserService testService = (IUserService) ctx.getBean("userServiceImpl");
        User user = new User();
        user.setAge(1);
        user.setUser_name("::xx");
        user.setNice_name("ddd");
        testService.save(user);
        testService.getAllUser();
    }

}
